﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="TestControls._Default" %>

<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
<%@ Register Assembly="GandA.Web.UI.Controls" Namespace="GandA.Web.UI.Controls" TagPrefix="cc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Prueba de controles GandA
    </h2>
    <p>
        TextBox
    </p>
    <asp:UpdatePanel ID="up1" runat="server">
            <ContentTemplate>
                TextBox:<cc1:TextBox ID="TextBox1" runat="server" MaxLength="5" />
                <br />
                TextBox Correo:
                <cc1:TextBox ID="TextBox2" runat="server" MaxLength="20" EnabledValidatorExpression="true" />
                <br />
                TextBox MultiLine:<br />
                <cc1:TextBox ID="TextBox4" runat="server" MaxLength="20" TextMode="MultiLine" Height="80px"
                    Width="200" EnabledValidator="true" />
                <br />
                ComboBox:
                <cc1:ComboBox ID="ComboBox1" runat="server" DefaultText="Seleccione algo..." Width="350px" TabIndex="2" EnabledValidator="true" ErrorMessage="Campo requerido" />
                <br />
                DatePicker
                <cc1:DatePicker ID="DatePicker1" runat="server" AutoPostBack="false" Width="120" EnabledValidator="true" />
                <br />
                CheckBox:
                <cc1:CheckBox ID="CheckBox1" runat="server" Text="Prueba" Checked="true" AutoPostBack="true"/>
                <asp:Button ID="Button3" runat="server" Text="Valid" OnClientClick="return ValidaRequeridos();" />
                <br />
                Numeric:
                <cc1:TextBoxNumeric ID="TextBoxNumeric2" runat="server" MaxLength="5" EnabledValidator="true" />
                <br />
                Menú
                <cc1:Menu ID="menu1" runat="server" StyleMenu="Style3">
                    <cc1:Item ID="Catalogos" Description="Catálogos">
                        <cc1:SubItem ID="SubItem2" runat="server" Description="Clientes">
                        </cc1:SubItem>
                        <cc1:SubItem ID="SubItem1" Description="Artículos">
                            <cc1:SubSubItem ID="ItemSubItem1" Description="Alta">
                            </cc1:SubSubItem>
                            <cc1:SubSubItem ID="Item2" Description="Configuracion">
                            </cc1:SubSubItem>
                        </cc1:SubItem>
                        <cc1:SubItem ID="SubItem3" runat="server" Description="Sucursales">
                        </cc1:SubItem>
                    </cc1:Item>
                    <cc1:Item ID="Item1" Description="Operación">
                    </cc1:Item>
                </cc1:Menu>
                <br />
                <br />
                <br />
                <br />
                <br />
                Tab
                <br />
                <cc1:Tab ID="TabPrueba" runat="server" StyleTab="Style2" Width="100%" Height="100px">
                    <cc1:TabItem ID="TabItem1" Caption="Tab 1">
                        Tab 1
                    </cc1:TabItem>
                    <cc1:TabItem ID="TabItem2" Caption="Tab 2">
                        Tab 2
                    </cc1:TabItem>
                    <cc1:TabItem ID="TabItem3" Caption="Tab 3">
                        Tab 3
                    </cc1:TabItem>
                    <cc1:TabItem ID="TabItem4" Caption="Tab 4">
                        Tab 4
                    </cc1:TabItem>
                </cc1:Tab>
            </ContentTemplate>
        </asp:UpdatePanel>
        <br />
    <p style="text-align: center;">
        Grid
    </p>
    <br />
    <br />
    <br />
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
            <asp:Label ID="Label1" runat="server" />
            <cc1:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
                OnSelectedIndexChanging="GridView1_SelectedIndexChanging" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
                Width="800px" Height="200px" EmptyDataText="No hay datos" Caption="Titulo grid"
                AutoPostBack="False" DataKeyNames="IdVisita" AllowScroll="true" AllowPaging="true"
                PageSize="10" AllowSorting="true">
                <Columns>
                    <asp:BoundField DataField="IpVisita" HeaderText="IpVisita" SortExpression="IpVisita"
                        ItemStyle-Width="100px" Visible="true" />
                    <asp:BoundField DataField="FechaVisita" HeaderText="FechaVisita" SortExpression="FechaVisita"
                        ItemStyle-Width="50px" />
                    <asp:BoundField DataField="Ciudad" HeaderText="Ciudad" SortExpression="Ciudad" ItemStyle-Width="80px" />
                    <asp:BoundField DataField="Pais" HeaderText="Pais" SortExpression="Pais" ItemStyle-Width="80px" />
                    <asp:BoundField DataField="Explorador" HeaderText="Explorador" SortExpression="Explorador"
                        ItemStyle-Width="200px" />
                    <asp:BoundField DataField="EsMobile" HeaderText="EsMobile" SortExpression="EsMobile"
                        ItemStyle-Width="30px" FooterText="Prueba" />
                    <asp:BoundField DataField="SistemaOperativo" HeaderText="SistemaOperativo" SortExpression="SistemaOperativo"
                        ItemStyle-Width="60px" />
                    <asp:BoundField DataField="ReferenciaUrl" HeaderText="ReferenciaUrl" SortExpression="ReferenciaUrl"
                        ItemStyle-Width="100px" />
                    <asp:BoundField DataField="Estado" HeaderText="Estado" SortExpression="Estado" ItemStyle-Width="60px" />
                    <asp:BoundField DataField="latitud" HeaderText="latitud" SortExpression="latitud"
                        ItemStyle-Width="50px" />
                    <asp:BoundField DataField="longitud" HeaderText="longitud" SortExpression="longitud"
                        ItemStyle-Width="150px" Visible="true" />
                    <%--<asp:BoundField DataField="IpVisita" HeaderText="IpVisita" SortExpression="IpVisita" ItemStyle-Width="100px"/>
                        <asp:BoundField DataField="Ciudad" HeaderText="Ciudad" SortExpression="Ciudad"  ItemStyle-Width="700px" />--%>
                </Columns>
                <AlternatingRowStyle CssClass="GridViewRowAlternating" BorderStyle="Solid" BorderWidth="0px"
                    BorderColor="White" />
                <SelectedRowStyle CssClass="GridViewRowSelected" />
                <SortedAscendingHeaderStyle CssClass="gridViewSortedAscending" />
                <FooterStyle ForeColor="Black" />
            </cc1:GridView>
            <%--<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:dbSiteConnectionString %>"
                SelectCommand="SELECT 20  [IpVisita], [FechaVisita], [Ciudad], [Pais], [Explorador], [EsMobile], [SistemaOperativo], [ReferenciaUrl], [Estado], [latitud], [longitud], [IdVisita] FROM [Visita]">
            </asp:SqlDataSource>--%>
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="Button2" />
        </Triggers>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" CausesValidation="false" />
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:Button ID="Button2" runat="server" Text="Expotar" OnClick="Button2_Click" Enabled="false" CausesValidation="false" />
    <table>
        <tr style="display: none">
            <td>
            </td>
        </tr>
    </table>
    <br />
</asp:Content>
